<?php
@$xgjbxx=$_REQUEST['xgjbxx'];@$xingming1=$_REQUEST['xingming1'];
@$dianhua1=$_REQUEST['dianhua1'];@$qq1=$_REQUEST['QQ1'];@$email1=$_REQUEST['email1'];
@$idcard1=$_REQUEST['idcard1'];
session_start();
@$admin=$_SESSION["ZH"];
if($xgjbxx=='xgjbxx' && !empty($admin)){
    $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
    $use=$pdo->prepare('update customerLogin set named=:named,tel=:tel,email=:email,idcard=:idcard,QQ=:qq where adm=:adm;');
    $use->execute(array('named'=>$xingming1,'tel'=>$dianhua1,'email'=>$email1,'idcard'=>$idcard1,'qq'=>$qq1,'adm'=>$admin));
    header("Location:Cmain.php");
}

@$value=$_REQUEST['value'];@$pk=$_REQUEST['pk'];
if(!empty($value) && !empty($pk) && !empty($admin)){
     if($pk=='1'){
         $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
         $use=$pdo->prepare('update customerLogin set towork=:towork where adm=:adm');
         $ok=$use->execute(array('towork'=>$value,'adm'=>$admin));
     }
    if($pk=='2'){
        $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
        $use=$pdo->prepare('update customerLogin set unit=:unit where adm=:adm');
        $ok=$use->execute(array('unit'=>$value,'adm'=>$admin));
    }
    if($pk=='3'){
        $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
        $use=$pdo->prepare('update customerLogin set sex=:sex where adm=:adm');
        $ok=$use->execute(array('sex'=>$value,'adm'=>$admin));
    }
    if($pk=='4'){
        $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
        $use=$pdo->prepare('update customerLogin set diploma=:diploma where adm=:adm');
        $ok=$use->execute(array('diploma'=>$value,'adm'=>$admin));
    }
    if($pk=='5'){
        $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
        $use=$pdo->prepare('update customerLogin set marry=:marry where adm=:adm');
        $ok=$use->execute(array('marry'=>$value,'adm'=>$admin));
    }
    if($pk=='6'){
        $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
        $use=$pdo->prepare('update customerLogin set address=:address where adm=:adm');
        $ok=$use->execute(array('address'=>$value,'adm'=>$admin));
    }
    if($pk=='7'){
        $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
        $use=$pdo->prepare('update customerLogin set jiguan=:jiguan where adm=:adm');
        $ok=$use->execute(array('jiguan'=>$value,'adm'=>$admin));
    }
    if($pk=='8'){
        $pdo=new PDO('mysql:dbname=shuju;charset=utf8','root');
        $use=$pdo->prepare('update customerLogin set interest=:interest where adm=:adm');
        $a=implode('<br/>',$value);
        $ok=$use->execute(array('interest'=>$a,'adm'=>$admin));
    }
}

?>
